<?php

namespace app\admin\model\zzyy;


use think\Model;


class ZzyySetting extends Model
{

    // 表名
    protected $name = 'zzyy_setting';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'integer';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];

    static public  function getRentRefund()
    {
        $data = self::where('name', 'rent_refund')->find();
        return $data->value;
    }

    static public function getRentAtLeastMin()
    {
        $data = self::where('name', 'rent_at_least_min')->find();
        return $data->value;
    }

    static public function getRentReserveAdvanceDay()
    {
        $data = self::where('name', 'rent_reserve_advance_day')->find();
        return $data->value;
    }

    static public function getUnlockInadvanceMin()
    {
        $data = self::where('name', 'unlock_inadvance_min')->find();
        return $data->value;
    }

    static public function getPayCountdownSec()
    {
        $data = self::where('name', 'pay_countdown_sec')->find();
        return $data->value;
    }

}
